<?php
# FileName="Connection_php_mysql.htm"
# Type="MYSQL"
# HTTP="true"
$hostname_DBconnect = "localhost";$database_DBconnect = "kotr";$username_DBconnect = "root";$password_DBconnect = "";
#$hostname_DBconnect = "localhost";#$database_DBconnect = "proactive_cmr";#$username_DBconnect = "proac_cmr";#$password_DBconnect = "c0l0rM4nilaRun";$mysqlLink = new mysqli($hostname_DBconnect, $username_DBconnect, $password_DBconnect, $database_DBconnect);
$DBconnect = mysql_pconnect($hostname_DBconnect, $username_DBconnect, $password_DBconnect) or trigger_error(mysql_error(),E_USER_ERROR); 
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") {
  $theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue;
  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;    
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}
?>